﻿namespace MMB.Demo.WindowsService;

public class DemoWindowsServiceModule() : MergeBlockModule("DemoWindows服务模块")
{
    public override void OnConfigureServices(ServiceConfigurationContext context)
    {
        context.Services.AddHostedService<Worker>();
    }
    public override void OnApplicationInitialization(ApplicationInitializationContext context)
    {
        ILogger<DemoWindowsServiceModule>? logger = context.ServiceProvider.GetService<ILogger<DemoWindowsServiceModule>>();
        logger?.LogInformation("[Demo模块]初始化中");
    }
}
